/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ElectricBlanket {
    static categoryCode = '010060002';

    static categoryName = '电热毯';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return ElectricBlanket.categoryCode;
    }

    get categoryName() {
        return ElectricBlanket.categoryName;
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'phEqB2uE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getGear(params) {
        return command({
            method: 'getGear',
            methodId: 'ptRSe829',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHeatingSwitch(params) {
        return command({
            method: 'getHeatingSwitch',
            methodId: 'pDrht3Xz',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'p1vZOVyW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTargetWorkingHours(params) {
        return command({
            method: 'getTargetWorkingHours',
            methodId: 'pdN7Wcin',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWorkMode(params) {
        return command({
            method: 'getWorkMode',
            methodId: 'pgh07JQI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getWorkingHours(params) {
        return command({
            method: 'getWorkingHours',
            methodId: 'p3de1YwM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setGear(params) {
        return command({
            method: 'setGear',
            methodId: 'pZgRqLEo',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setHeatingSwitch(params) {
        return command({
            method: 'setHeatingSwitch',
            methodId: 'ppAXzdAk',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH39XVq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTargetWorkingHours(params) {
        return command({
            method: 'setTargetWorkingHours',
            methodId: 'pGoxGS1R',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setWorkMode(params) {
        return command({
            method: 'setWorkMode',
            methodId: 'pUPQoZ51',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ElectricBlanket;
